package com.whfp.coky.ui.task.model

import android.os.Parcel
import android.os.Parcelable

/**
 * 用于封装设备检测完毒品返回的结果
 */
class TestVoBean() : Parcelable {
    //测试毒品名称
    var drugsName: String? = null

    //C值
     var cValue: String? = null

    //T值
     var tValue: String? = null

    //浓度值
    var potency: String? = null

    //判定结果（阴性or可疑or阳性）
    var result: String? = null

    //单位
    var unit: String? = null

    //C值位置
     var cPos = 0

    //T值位置
     var tPos = 0

    //T比C的值
    var ctValue: String? = null

    constructor(parcel: Parcel) : this() {
        drugsName = parcel.readString()
        cValue = parcel.readString()
        tValue = parcel.readString()
        potency = parcel.readString()
        result = parcel.readString()
        unit = parcel.readString()
        cPos = parcel.readInt()
        tPos = parcel.readInt()
        ctValue = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(drugsName)
        parcel.writeString(cValue)
        parcel.writeString(tValue)
        parcel.writeString(potency)
        parcel.writeString(result)
        parcel.writeString(unit)
        parcel.writeInt(cPos)
        parcel.writeInt(tPos)
        parcel.writeString(ctValue)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<TestVoBean> {
        override fun createFromParcel(parcel: Parcel): TestVoBean {
            return TestVoBean(parcel)
        }

        override fun newArray(size: Int): Array<TestVoBean?> {
            return arrayOfNulls(size)
        }
    }

}